package com.geekgo.ladder.core.support;

/**
 * @author geekgo
 * @version 2016/12/22 16:12
 */
public enum HttpCode {

    /**200请求成功*/
    OK(200),
    /**207频繁操作*/
    MULTI_STATUS(207),
    /**303登陆失败*/
    LOGIN_FAIL(303),
    /**400请求参数出错*/
    BAD_REQUEST(400),
    /**401未登录*/
    UNAUTHORIZED(401),
    /**403未授权*/
    FORBIDDEN(403),
    /**404找不到页面*/
    NOT_FOUND(404),
    /**408请求超时*/
    REQUEST_TIMEOUT(408),
    /**409发生冲突*/
    CONFLICT(409),
    /**410已被删除*/
    GONE(410),
    /**423已被锁定*/
    LOCKED(423),
    /**500服务器出错*/
    INTERNAL_SERVER_ERROR(500);

    private final Integer value;
    HttpCode(Integer value){
        this.value = value;
    }
    public Integer value(){
        return this.value;
    }
    public String msg(){
        return "HTTP_CODE:"+value;
    }
    public String toString(){
        return this.value.toString();
    }
}
